import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

let defaultCity = "南京"
defaultCity = localStorage.city
const state = {
  city: defaultCity
}

const mutations = {
  changeMyCity(state, city) {
    state.city = city;
    localStorage.city = city
  }
}

export default new Vuex.Store({
  state,
  mutations
})
